/**
 * 全局actions
 */
import types from './types'
const actions = {
  incrementAync: ({commit, state}) => {
    var p = new Promise((resolve, reject) => {
      setTimeout(() => {
        resolve()
      }, 3000)
    })
    p.then(() => {
      commit(types.INCREMENT)
    }).catch(err => console.log(err))
  }
}

export default actions
